package com.lucas.rpc.framework.loadbalance;

import com.lucas.rpc.framework.remote.URL;

import java.util.List;
import java.util.Random;

/**
 * @author: LiuCheng
 * @description:
 * @date: 2023-11-28 15:14
 **/
public class RandomLoadBalance {

    public static URL selectURL(List<URL> list){

        Random random = new Random();
        int index = random.nextInt(list.size());
        return list.get(index);

    }

}
